<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

	<xsl:template name="avatar">
		<xsl:param name="url"/>
		<xsl:param name="size"/>

		<xsl:variable name="width">
			<xsl:value-of select="substring-before($size, 'x')"/>
		</xsl:variable>

		<xsl:variable name="height">
			<xsl:value-of select="substring-after($size, 'x')"/>
		</xsl:variable>

		<xsl:choose>
			<xsl:when test="$url = ''">
				<img src="{$imagesURL}0.gif" width="{$width}" height="{$height}" style="border: 1px solid #B7B7B7; background-color: #EEEEEE;" />
			</xsl:when>
			<xsl:otherwise>
				<img src="{$url}" style="border: 1px solid #B7B7B7;" width="{$width}" height="{$height}"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

</xsl:stylesheet>